package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service
public class HelloServiceImpl implements HelloService {

    @Override
    public String sayHelloA() {

        // 随机休眠0～100ms
        try {
            Thread.sleep(new Random().nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "sayHello A";
    }

    @Override
    public String sayHelloB() {

        // 随机休眠0～100ms
        try {
            Thread.sleep(new Random().nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "sayHello B";
    }

    @Override
    public String sayHelloC() {

        // 随机休眠0～100ms
        try {
            Thread.sleep(new Random().nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "sayHello C";
    }
}
